
<template>
  <div class="risk-content">
    <eagle-tab-page-list
      url="/ExExamUserPaper/GetPageData"
      :params="params"
      @initActive="_initActive"
      @initList="_initList"
    >
      <template v-if="active === 0">
        <div class="plan-list">
          <div
            class="plan-detail mb-10"
            v-for="(item, index) in list"
            :key="index"
            @click="_goDetail(item)"
          >
            <div class="exam-chnname mb-10">
              {{ item.ChnName }}<span>{{ item.OrgName }}</span>
            </div>
            <div class="exam-name mb-10">
              <img src="@/assets/Images/AppIcon/icon_list_kind.png" alt="" />
              {{ item.ExamName }}
            </div>
            <div class="exam-name mb-5">
              <img
                src="@/assets/Images/AppIcon/icon_list_time.png"
                alt=""
              />交卷时间：{{ item.EndTime }}
            </div>
            <div class="exam-time">
              <img
                src="@/assets/Images/AppIcon/icon_list_edit.png"
                alt=""
              />批阅
            </div>
          </div>
        </div>
      </template>
      <template v-else>
        <div class="plan-list">
          <div
            class="plan-detail mb-10"
            v-for="(item, index) in list"
            :key="index"
            @click="_goDetail(item)"
          >
            <div class="exam-chnname mb-10">
              {{ item.ChnName }}<span>{{ item.OrgName }}</span>
            </div>
            <div class="exam-name mb-10">
              <img src="@/assets/Images/AppIcon/icon_list_kind.png" alt="" />
              {{ item.ExamName }}
            </div>
            <div class="exam-name mb-10">
              <img
                src="@/assets/Images/AppIcon/icon_list_time.png"
                alt=""
              />交卷时间：{{ item.EndTime }}
            </div>
            <div class="exam-name">
              <img
                src="@/assets/Images/AppIcon/icon_list_score.png"
                alt=""
              />得分：{{ item.Score }}
            </div>
            <eagle-tag v-if="!item.IsPass" type="warning" class="tags"
              >不通过</eagle-tag
            >

            <eagle-tag v-if="item.IsPass" type="success" class="tags"
              >通过</eagle-tag
            >
          </div>
        </div>
      </template>
    </eagle-tab-page-list>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
      list: [],
      params: [
        {
          title: "待我批阅的试卷",
          dataType: "UnMark",
          badge: false,
        },
        {
          title: "已批阅的试卷",
          dataType: "Marked",
          badge: false,
        },
      ],
      CurrentProgress: 60,
    };
  },
  created() {},
  methods: {
    _initActive(active) {
      this.active = active;
    },
    _initList(list) {
      this.list = list;
    },
    // 详情
    _goDetail(item) {
      this.$router.push("/Train/ExamReviewDetail?id=" + item.ID);
    },
  },
};
</script>

<style lang="less" scoped>
.risk-content {
  background-color: #e8f1f8;
  min-height: 100vh;
  .info_search {
    padding: 10px;
    border-radius: 5px !important;
    .van-field__control {
      background-color: #ffffff !important;
    }
  }
}

.plan-detail {
  width: 100%;
  background-color: #fff;
  border-radius: 8px;
  padding: 10px;
  color: #333;
  font-size: 14px;
  position: relative;
  img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
  }
  .tags {
    display: block;
    width: 50px;
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    border-radius: 0 5px 0 5px;
    font-size: 0.25rem;
  }
}
.exam-chnname {
  font-size: 16px;
  > span {
    margin-left: 20px;
    font-size: 12px;
    color: #666;
  }
}
.exam-time {
  height: 28px;
  line-height: 28px;
  border-top: 1px solid #eee;
  text-align: right;
}

.plan-list{
  margin-top: 10px;
  margin-left: 10px;
  margin-right: 10px;
}
</style>